<template>
  <div id="app">
    <!-- <CTransactionProcess></CTransactionProcess> -->
  </div>
</template>

<script>
import CTransactionProcess from "../../src/c-transaction-process/index.vue";
import Buy from "../../src/c-transaction-process/buy";
// import { showScanBox } from "../../src/c-transaction-process/components/ScanPayBox/index.js";


export default {
  components: { CTransactionProcess },
  async created() {
    console.log(111);
    const info = new Buy( {
         spu_id: 'lg_240807xhkihSseD1HQ1QdUAoQvVrI',
        sku_id: 'SKU_ALG_7230423415357y5rgE28',
      },
        {
        // redirectUrl:'',
        // paySuccessUrl: 'https://www.baidu.com/',
        // payFailUrl: 'https://www.youtube.com/'
      },false)
    console.log(info, 222);
    
    info.getPayWay().then(({token, payWay, showSelectPayWay}) => {
        if (showSelectPayWay === 2) {
          console.log('')
          // showDiscountAlert.value  = true
          } else {
          info.perform({ token, payWay })
        }
    })


  },
  mounted() {
    // showScanBox()
  },
}
</script>

<style lang="scss">
html {
  font-size: 50px;
}
</style>
